package com.xyz.study.design_mode.p_mediator.mode;

/**
 * 角色：ConcreteColleague 具体的同事
 *
 * @author XYZ
 * @version 1.0
 * @since 2023/1/11
 */
public class XiaoHong extends Colleague {

    @Override
    public String name() {
        return "小红";
    }

    @Override
    public void colleagueChanged() {
        System.out.println(name() + ": 我吃完饭了，好无聊");
        mediator.colleagueChanged(this);
    }

    @Override
    void controlColleague() {
        System.out.println("妈妈：" + name() + "快去睡觉");
    }
}
